package factory.absfactory.pizzastore.order;

import factory.factorymethod.pizzastore.pizz.BJCheesePizza;
import factory.factorymethod.pizzastore.pizz.BjPepperPizza;
import factory.factorymethod.pizzastore.pizz.Pizz;

/**
 * @Author liangliangzhao
 * @data 2023/2/28 14:41
 */

public class BJFactory implements AbsFactory {
    @Override
    public Pizz createPizza(String orderType) {
        System.out.println("~使用的是抽象工程模式~");
        Pizz pizz = null;
        if(orderType.equals("cheese")){
            pizz = new BJCheesePizza();
        } else if (orderType.equals("pepper")) {
            pizz = new BjPepperPizza();
        }
        return pizz;
    }
}
